﻿@model PhotoGallery.Models.AlbumInfo
@using PhotoGallery.Views

@{
    ViewBag.Title = "Delete";
}

<h2>@Labels.delete</h2>
@using (Html.BeginForm())
{
<fieldset>
        <legend>@Labels.album</legend>
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model=>model.FileName)
        @Html.HiddenFor(model=>model.FullFileName)
        @Html.HiddenFor(model=>model.CreateDate)
        @Html.ValidationSummary(false)
        <div>
            @if (String.IsNullOrEmpty(Model.FileName))
            {
                <img alt="" src="@Url.Content("~//Content//empty_album.png")" class="thumbnail-border" width="180" height="180" />
            }
            else
            {
                <img alt="@Model.Title" src="@Url.Action("Thumbnail", new { file = Model.FullFileName })" />
            }
        </div>
    
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CreateDate)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.CreateDate)
        </div>
        <p>
            <input type="submit" value="@Labels.delete" />
            <a href="@Html.Encode(ViewBag.backUrl)"  class="button-link-100">@Labels.cancel </a>
        </p>
    </fieldset>
}
